<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<button onclick=doAlert()>alert</button>
<button onclick=doConfirm()>confirm</button>
<button onclick=doPrompt()>prompt</button>
<script>
    /*
        alert()
        confirm()
        prompt()
     */

    function doAlert() {
        alert('Are you OK?')
    }

    function doConfirm() {
        const value = confirm('Are you OK?')
        console.log(`you clicked ${value ? 'yes' : 'no'}`)
    }
    function doPrompt() {
       const value =  prompt('Are you OK?','yes')
        console.log('you say '+value)
    }
    
    
    /*
        异步的
        print()  // 调用打印机
        find()  //
     */
    // setTimeout(print,5000)
</script>
</body>
</html>